<script type="text/javascript">
    $(function () {
        $("input[name='wifilimit']").keyup(function () {
            var tmptxt = $(this).val();
            $(this).val(tmptxt.replace(/\D|^0/g, ''));
        }).bind("paste", function () {
            var tmptxt = $(this).val();
            $(this).val(tmptxt.replace(/\D|^0/g, ''));
        }).css("ime-mode", "disabled");
    });
</script>
<ol class="breadcrumb">
    <li><a href="#">奇妙云箱</a></li>
    <li><a href="/device/list">设备管理</a></li>
    <li>WIFI设置</li>
</ol>
<div class="panel panel-default">
    <div class="panel-heading">
        <span class="glyphicon glyphicon-pencil"></span>
        <span class="panel-title">请填写WIFI信息</span>
    </div>
    <div class="panel-body">
        <form action="/device/wifi" method="post" enctype="multipart/form-data" name="form1"
              class="form-horizontal">
            <input type="hidden" value="<%= id %>" name="id">
            <input type="hidden" value="<%= phone %>" name="phone">

            <div class="form-group">
                <label class="control-label col-xs-2" for="firstname">WIFI名称：</label>

                <div class="col-xs-9">
                    <input type="text" class="form-control" id="wifissid" name="wifissid" value="<%= sim.wifissid %>"
                           placeholder="请输入WIFI名称">
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-2" for="lastname">WIFI密码：</label>

                <div class="col-xs-9">
                    <input type="text" class="form-control" id="wifipass" name="wifipass" value="<%= sim.wifipass %>"
                           placeholder="请输入WIFI密码">
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-2" for="lastname">限制流量（单位M）：</label>

                <div class="col-xs-9">
                    <input type="text" class="form-control" id="wifilimit" name="wifilimit" value="<%= sim.wifilimit %>"
                           placeholder="请输入限制流量">
                </div>
            </div>

            <div class="form-group">
                <div class="col-xs-9 col-xs-offset-2">
                    <button type="submit" class="btn btn-success col-xs-2">提交</button>
                </div>
            </div>
        </form>
    </div>
</div>